package com.xiongwei.flyweight;

public class Client {

    public static void main(String[] args) {
        WebsiteFactory websiteFactory = new WebsiteFactory();
        websiteFactory.getWebsiteByType("网站").use(new User("张三"));
        websiteFactory.getWebsiteByType("网站").use(new User("李四"));
        websiteFactory.getWebsiteByType("小程序").use(new User("王五"));

        System.out.println("网站分类总数为" + websiteFactory.getWebsiteCount());
    }
}
